import Vue from 'vue'
import App from './App.vue'
import store from './store';
import websocketStore from './store/websocketStore.js';
// import '@/assets/reset.css'//初始样式设置
import "@babel/polyfill" //用来兼容ie
// import '@/components' //按需加载的ant-design 样式
// import Antd from 'ant-design-vue'
import 'ant-design-vue/dist/antd.less'
// Vue.use(Antd)
import '@/utils/dragModal'; //拖拽弹框
import '@/utils/dragControl'; //拖拽工具
import i18n from './locales'
import '@/core/antd/lazyload'
import filterbar from '@/components/filterbar'
import STable from '@/components/Table';
import proTable from '@/components/pro-table';
import globalModal from '@/components/globalModal';
Vue.component('filterbar', filterbar)
Vue.component('STable', STable)
Vue.component('proTable', proTable)
Vue.component('globalModal', globalModal)
import router from './router';
import './permission' //权限路由处理
import '@/utils/hasPermission'

import moment from 'moment'
import 'moment/locale/zh-cn';
moment.locale('zh-cn');
window.moment = moment;
import {
	postAction,
	getAction,
	postActionUpload,
	postActionExport,
	api,
	sysManageapi
} from '@/api/index.js';
Vue.prototype.$postAction = postAction;
Vue.prototype.$getAction = getAction;
Vue.prototype.$postActionUpload = postActionUpload;
Vue.prototype.$postActionExport = postActionExport;
Vue.prototype.$api = api;
Vue.prototype.$sysManageapi = sysManageapi;
import pick from 'lodash.pick';
Vue.prototype.$pick = pick;
import {
	ConfigProvider
} from 'ant-design-vue';
Vue.use(ConfigProvider)

import themePluginConfig from '@/config/themePluginConfig'
window.umi_plugin_ant_themeVar = themePluginConfig.theme
// store.dispatch('setLang', 'zh-CN')
/* 设置本地缓存*/
import Storage from 'vue-ls'
import config from '@/config/defaultSettings'
Vue.use(Storage, config.storageOptions)
// 全局注入混入
import mixin from '@/mixins'
Vue.mixin(mixin)
// 项目store初始化
import preview from 'vue-photo-preview'
import 'vue-photo-preview/dist/skin.css'
Vue.use(preview, {
	fullscreenEl: false,
	tapToClose: true
});
import * as echarts from 'echarts';
Vue.prototype.fileUrl = process.env.VUE_APP_FILE_API;
Vue.config.productionTip = false // 消息提示的环境配置，设置为开发环境或者生产环境


new Vue({
	router,
	store,
	websocketStore,
	i18n, // 不要忘记
	render: h => h(App)
}).$mount('#app')